package com.patchmanage.back.task;

import com.patchmanage.back.service.IInventoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @className: InventoryTask
 * @description:
 * @author: huizhao
 * @date: 2021/7/15
 **/
@Component
public class InventoryTask {

    private Logger logger = LoggerFactory.getLogger(getClass());
    private int i;

    @Autowired
    private IInventoryService iInventoryService;

    @Scheduled(cron = "*/60 * * * * ? ")
    public void execute() {
        logger.info("===================资产分组开始===============");
        iInventoryService.groupForInventorys();
        logger.info("===================资产分组结束===============");
    }
}
